package com.mystudy.springcloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "cloud-provider-hystrix-payment", fallback = PaymentFallbackService.class)
public interface PaymentHystrixService {
	/**
	 * @功能: OpenFeign远程调用服务端不会出问题的方法
	 */
	@GetMapping("/payment/hystrix/ok/{id}")
	String peymentInfo_OK(@PathVariable("id") Integer id);

	/**
	 * @功能: OpenFeign远程调用服务端可能会出问题的方法
	 */
	@GetMapping("/payment/hystrix/timeout/{id}")
	String payment_TimeOut(@PathVariable("id") Integer id);
}
